package com.jiuhao.api;

import cn.hutool.json.JSONObject;
import com.jiuhao.dto.DocumentInfoDto;
import com.jiuhao.dto.SegmentsDto;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

import java.util.Map;

public interface BaiduApiService {

    /**
     * 获取文档详情
     */
    @GET("/csp-service/api/v2/llm/document/detail/public/i18n")
    Call<DocumentInfoDto> getDocumentDetail(
            @Query("id") String documentId,
            @Query("knowledgePublic") int knowledgePublic,
            @Query("i18n") int i18n
    );

    /**
     * 获取文档分段内容
     */
    @GET("/csp-service/api/v2/llm/segment/all/public/i18n")
    Call<SegmentsDto> getDocumentSegments(
            @Query("documentId") String documentId,
            @Query("keyword") String keyword,
            @Query("segmentId") String segmentId,
            @Query("t") long timestamp,
            @Query("knowledgePublic") int knowledgePublic,
            @Query("i18n") int i18n
    );
}
